#include<stdio.h>
int my_best(int num, int sum)
{
	int count = 0;
	unsigned int maxe = num^sum;
	while (maxe)
	{
		if (maxe % 2 == 1)
			count++;
		maxe = maxe >> 1;

	}
	return count;
}
int main()
{
	int num = 0;
	int sum = 0;
	scanf_s("%d%d", &num, &sum);
	int count = 0;
	count = my_best(num, sum);
	printf("%d", count);
	return 0;
}